package com.tsystems.tuni.sportplanet.entity;

// Generated Nov 28, 2012 7:14:09 PM by Hibernate Tools 3.4.0.CR1

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * @author Yuriy Eremin
 * 
 */
@Embeddable
public class ResultId implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int teamTeamId;
	private int gameGameId;

	public ResultId() {
	}

	public ResultId(int teamTeamId, int gameGameId) {
		this.teamTeamId = teamTeamId;
		this.gameGameId = gameGameId;
	}

	@Column(name = "TEAM_team_id", nullable = false)
	public int getTeamTeamId() {
		return this.teamTeamId;
	}

	public void setTeamTeamId(int teamTeamId) {
		this.teamTeamId = teamTeamId;
	}

	@Column(name = "GAME_game_id", nullable = false)
	public int getGameGameId() {
		return this.gameGameId;
	}

	public void setGameGameId(int gameGameId) {
		this.gameGameId = gameGameId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ResultId))
			return false;
		ResultId castOther = (ResultId) other;

		return (this.getTeamTeamId() == castOther.getTeamTeamId())
				&& (this.getGameGameId() == castOther.getGameGameId());
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + this.getTeamTeamId();
		result = 37 * result + this.getGameGameId();
		return result;
	}

}
